<span class='l l-1 source php'><s class='source php embedded block html' data-entity-scope='source.php.embedded.block.html'><s class='punctuation section embedded begin php' data-entity-scope='punctuation.section.embedded.begin.php'>&lt;?php</s>
</span><span class='l l-2 source php'>
</span><span class='l l-3 source php'><s class='comment line double-slash php' data-entity-scope='comment.line.double-slash.php'><s class='punctuation definition comment php' data-entity-scope='punctuation.definition.comment.php'>//</s> base class with member properties and methods
</s></span><span class='l l-4 source php'><s class='meta class php' data-entity-scope='meta.class.php'><s class='storage type class php' data-entity-scope='storage.type.class.php'>class</s> <s class='entity name type class php' data-entity-scope='entity.name.type.class.php'>Vegetable</s> {</s>
</span><span class='l l-5 source php'>
</span><span class='l l-6 source php'>   <s class='storage type php' data-entity-scope='storage.type.php'>var</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>edible</s></s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-7 source php'>   <s class='storage type php' data-entity-scope='storage.type.php'>var</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>color</s></s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-8 source php'>
</span><span class='l l-9 source php'><s class='meta function php' data-entity-scope='meta.function.php'>   <s class='storage type function php' data-entity-scope='storage.type.function.php'>function</s> <s class='entity name function php' data-entity-scope='entity.name.function.php'>Vegetable</s><s class='punctuation definition parameters begin php' data-entity-scope='punctuation.definition.parameters.begin.php'>(</s><s class='meta function arguments php' data-entity-scope='meta.function.arguments.php'><s class='meta function argument no-default php' data-entity-scope='meta.function.argument.no-default.php'><s class='variable other php' data-entity-scope='variable.other.php'><s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>$</s>edible</s></s>, $color=&quot;green&quot;</s>)</s>
</span><span class='l l-10 source php'>   {
</span><span class='l l-11 source php'>       <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>this</s></s><s class='keyword operator class php' data-entity-scope='keyword.operator.class.php'>-&gt;</s><s class='variable other property php' data-entity-scope='variable.other.property.php'>edible</s> <s class='keyword operator assignment php' data-entity-scope='keyword.operator.assignment.php'>=</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>edible</s></s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-12 source php'>       <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>this</s></s><s class='keyword operator class php' data-entity-scope='keyword.operator.class.php'>-&gt;</s><s class='variable other property php' data-entity-scope='variable.other.property.php'>color</s> <s class='keyword operator assignment php' data-entity-scope='keyword.operator.assignment.php'>=</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>color</s></s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-13 source php'>   }
</span><span class='l l-14 source php'>
</span><span class='l l-15 source php'><s class='meta function php' data-entity-scope='meta.function.php'>   <s class='storage type function php' data-entity-scope='storage.type.function.php'>function</s> <s class='entity name function php' data-entity-scope='entity.name.function.php'>is_edible</s><s class='punctuation definition parameters begin php' data-entity-scope='punctuation.definition.parameters.begin.php'>(</s><s class='meta function arguments php' data-entity-scope='meta.function.arguments.php'></s>)</s>
</span><span class='l l-16 source php'>   {
</span><span class='l l-17 source php'>       <s class='keyword control php' data-entity-scope='keyword.control.php'>return</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>this</s></s><s class='keyword operator class php' data-entity-scope='keyword.operator.class.php'>-&gt;</s><s class='variable other property php' data-entity-scope='variable.other.property.php'>edible</s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-18 source php'>   }
</span><span class='l l-19 source php'>
</span><span class='l l-20 source php'><s class='meta function php' data-entity-scope='meta.function.php'>   <s class='storage type function php' data-entity-scope='storage.type.function.php'>function</s> <s class='entity name function php' data-entity-scope='entity.name.function.php'>what_color</s><s class='punctuation definition parameters begin php' data-entity-scope='punctuation.definition.parameters.begin.php'>(</s><s class='meta function arguments php' data-entity-scope='meta.function.arguments.php'></s>)</s>
</span><span class='l l-21 source php'>   {
</span><span class='l l-22 source php'>       <s class='keyword control php' data-entity-scope='keyword.control.php'>return</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>this</s></s><s class='keyword operator class php' data-entity-scope='keyword.operator.class.php'>-&gt;</s><s class='variable other property php' data-entity-scope='variable.other.property.php'>color</s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-23 source php'>   }
</span><span class='l l-24 source php'>
</span><span class='l l-25 source php'>} <s class='comment line double-slash php' data-entity-scope='comment.line.double-slash.php'><s class='punctuation definition comment php' data-entity-scope='punctuation.definition.comment.php'>//</s> end of class Vegetable
</s></span><span class='l l-26 source php'>
</span><span class='l l-27 source php'><s class='comment line double-slash php' data-entity-scope='comment.line.double-slash.php'><s class='punctuation definition comment php' data-entity-scope='punctuation.definition.comment.php'>//</s> extends the base class
</s></span><span class='l l-28 source php'><s class='meta class php' data-entity-scope='meta.class.php'><s class='storage type class php' data-entity-scope='storage.type.class.php'>class</s> <s class='entity name type class php' data-entity-scope='entity.name.type.class.php'>Spinach</s> <s class='storage modifier extends php' data-entity-scope='storage.modifier.extends.php'>extends</s> <s class='entity other inherited-class php' data-entity-scope='entity.other.inherited-class.php'>Vegetable</s> {</s>
</span><span class='l l-29 source php'>
</span><span class='l l-30 source php'>   <s class='storage type php' data-entity-scope='storage.type.php'>var</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>cooked</s></s> <s class='keyword operator assignment php' data-entity-scope='keyword.operator.assignment.php'>=</s> <s class='constant language php' data-entity-scope='constant.language.php'>false</s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-31 source php'>
</span><span class='l l-32 source php'><s class='meta function php' data-entity-scope='meta.function.php'>   <s class='storage type function php' data-entity-scope='storage.type.function.php'>function</s> <s class='entity name function php' data-entity-scope='entity.name.function.php'>Spinach</s><s class='punctuation definition parameters begin php' data-entity-scope='punctuation.definition.parameters.begin.php'>(</s><s class='meta function arguments php' data-entity-scope='meta.function.arguments.php'></s>)</s>
</span><span class='l l-33 source php'>   {
</span><span class='l l-34 source php'>       <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>this</s></s><s class='keyword operator class php' data-entity-scope='keyword.operator.class.php'>-&gt;</s><s class='meta function-call object php' data-entity-scope='meta.function-call.object.php'>Vegetable</s>(<s class='constant language php' data-entity-scope='constant.language.php'>true</s>, <s class='string quoted double php' data-entity-scope='string.quoted.double.php'><s class='punctuation definition string begin php' data-entity-scope='punctuation.definition.string.begin.php'>&quot;</s><s class='meta string-contents quoted double php' data-entity-scope='meta.string-contents.quoted.double.php'>green</s><s class='punctuation definition string end php' data-entity-scope='punctuation.definition.string.end.php'>&quot;</s></s>)<s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-35 source php'>   }
</span><span class='l l-36 source php'>
</span><span class='l l-37 source php'><s class='meta function php' data-entity-scope='meta.function.php'>   <s class='storage type function php' data-entity-scope='storage.type.function.php'>function</s> <s class='entity name function php' data-entity-scope='entity.name.function.php'>cook_it</s><s class='punctuation definition parameters begin php' data-entity-scope='punctuation.definition.parameters.begin.php'>(</s><s class='meta function arguments php' data-entity-scope='meta.function.arguments.php'></s>)</s>
</span><span class='l l-38 source php'>   {
</span><span class='l l-39 source php'>       <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>this</s></s><s class='keyword operator class php' data-entity-scope='keyword.operator.class.php'>-&gt;</s><s class='variable other property php' data-entity-scope='variable.other.property.php'>cooked</s> <s class='keyword operator assignment php' data-entity-scope='keyword.operator.assignment.php'>=</s> <s class='constant language php' data-entity-scope='constant.language.php'>true</s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-40 source php'>   }
</span><span class='l l-41 source php'>
</span><span class='l l-42 source php'><s class='meta function php' data-entity-scope='meta.function.php'>   <s class='storage type function php' data-entity-scope='storage.type.function.php'>function</s> <s class='entity name function php' data-entity-scope='entity.name.function.php'>is_cooked</s><s class='punctuation definition parameters begin php' data-entity-scope='punctuation.definition.parameters.begin.php'>(</s><s class='meta function arguments php' data-entity-scope='meta.function.arguments.php'></s>)</s>
</span><span class='l l-43 source php'>   {
</span><span class='l l-44 source php'>       <s class='keyword control php' data-entity-scope='keyword.control.php'>return</s> <s class='variable other php' data-entity-scope='variable.other.php'>$<s class='punctuation definition variable php' data-entity-scope='punctuation.definition.variable.php'>this</s></s><s class='keyword operator class php' data-entity-scope='keyword.operator.class.php'>-&gt;</s><s class='variable other property php' data-entity-scope='variable.other.property.php'>cooked</s><s class='punctuation terminator expression php' data-entity-scope='punctuation.terminator.expression.php'>;</s>
</span><span class='l l-45 source php'>   }
</span><span class='l l-46 source php'>
</span><span class='l l-47 source php'>} <s class='comment line double-slash php' data-entity-scope='comment.line.double-slash.php'><s class='punctuation definition comment php' data-entity-scope='punctuation.definition.comment.php'>//</s> end of class Spinach
</s></span><span class='l l-48 source php'>
</span><span class='l l-49 source php'><s class='punctuation section embedded end php' data-entity-scope='punctuation.section.embedded.end.php'><s class='source php' data-entity-scope='source.php'>?</s>&gt;</s></s></span>
